﻿using Authority.Model;
using AutoMapper;

namespace AutoMapper.DTO
{
    /// <summary>
    /// 权限相关映射
    /// </summary>
    public class AuthorityProfile : Profile
    {
        public AuthorityProfile()
        {

            #region Button
            CreateMap<ButtonsOperateRequest, SysButtonEntity>();
            #endregion

            #region Menus
            CreateMap<MenusRootRequest, SysMenuEntity>();

            CreateMap<MenusChildRequest, SysMenuEntity>();

            CreateMap<MenusModifyRequest, SysMenuEntity>();

            CreateMap<SysMenuEntity, MenusListResponse>();

            #endregion

            #region Role
            CreateMap<RoleRootRequest, SysRoleEntity>();

            CreateMap<RoleChildRequest, SysRoleEntity>();

            CreateMap<RoleModifyRequest, SysRoleEntity>();

            CreateMap<SysMenuEntity, RoleMenusListResponse>();

            CreateMap<RoleMenuButtonModifyInfo, SysRoleButtonEntity>();

            #endregion

            #region Department

            CreateMap<SysDepartmentEntity, DepartmentsListResponse>();

            CreateMap<DepartmentRootRequest, SysDepartmentEntity>();

            CreateMap<DepartmentChildRequest, SysDepartmentEntity>();

            CreateMap<DepartmentModifyRequest, SysDepartmentEntity>();

            #endregion

            #region Post
            CreateMap<PostOperateRequest, SysPostEntity>();
            #endregion
        }
    }
}
